home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 115_01.zip / ED6.CCC < prev    next >
Text File  |  1993-06-01  |  2KB  |  131 lines

  1.  
  2. /*
  3. Screen editor:  terminal output module
  4. Source:  ed6.ccc
  5. This file was created by the configuration program:
  6. Version 2:  September 6, 1981.
  7. */
  8.  
  9. /*
  10. Define the current coordinates of the cursor.
  11. */
  12.  
  13. int outx, outy;
  14.  
  15. /*
  16. Return the current coordinates of the cursor.
  17. */
  18.  
  19. outgetx()
  20. {
  21.     return(outx);
  22. }
  23.  
  24. outgety()
  25. {
  26.     return(outy);
  27. }
  28.  
  29. /*
  30. Output one printable character to the screen.
  31. */
  32.  
  33. outchar(c) char c;
  34. {
  35.     syscout(c);
  36.     outx++;
  37.     return(c);
  38. }
  39.  
  40. /*
  41. Position cursor to position x,y on screen.
  42. 0,0 is the top left corner.
  43. */
  44.  
  45. outxy(x,y) int x,y;
  46. {
  47.     outx=x;
  48.     outy=y;
  49.     syscout(27);
  50.     syscout('=');
  51.     syscout(x+32);
  52.     syscout(y+32);
  53. }
  54.  
  55. /*
  56. Erase the entire screen.
  57. Make sure the rightmost column is erased.
  58. */
  59.  
  60. outclr()
  61. {
  62. int k;
  63.     k=0;
  64.     while (k<SCRNL) {
  65.         outxy(0,k++);
  66.         outdelln();
  67.     }
  68.     outxy(0,0);
  69. }
  70.  
  71. /*
  72. Delete the line on which the cursor rests.
  73. Leave the cursor at the left margin.
  74. */
  75.  
  76. outdelln()
  77. {
  78.     outxy(0,outy);
  79.     outdeol();
  80. }
  81.  
  82. /*
  83. Delete to end of line.
  84. Assume the last column is blank.
  85. */
  86.  
  87. outdeol()
  88. {
  89.     syscout(27);
  90.     syscout('E');
  91. }
  92.  
  93. /*
  94. Return yes if terminal has indicated hardware scroll.
  95. */
  96.  
  97. outhasup()
  98. {
  99.     return(YES);
  100. }
  101.  
  102. outhasdn()
  103. {
  104.     return(YES);
  105. }
  106.  
  107. /*
  108. Scroll the screen up.
  109. Assume the cursor is on the bottom line.
  110. */
  111.  
  112. outsup()
  113. {
  114.     /* auto scroll */
  115.     outxy(0,SCRNL1);
  116.     syscout(10);
  117. }
  118.  
  119. /*
  120. Scroll screen down.
  121. Assume the cursor is on the top line.
  122. */
  123.  
  124. outsdn()
  125. {
  126.     /* auto scroll */
  127.     outxy(0,0);
  128.     syscout(27);
  129.     syscout('^');
  130. }
  131.